<!-- src/components/AuthButton.vue -->
<template>
  <el-button type="primary" @click="$emit('auth-clicked')">
    <img v-if="config.icon" :src="config.icon" alt="logo" class="provider-logo">
    {{ config.clientName }}登录
  </el-button>
</template>

<script setup>
defineProps({
  config: {
    type: Object,
    required: true
  }
});

defineEmits(['auth-clicked']);
</script>

<style>
.provider-logo {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}
</style>